# encoding=utf8
# -*- coding: utf-8 -*
__author__ = 'mmfu.cn@gmail.com'

def main():
    ori_f=open(ori_file,'r',encoding='utf8')
    ori_lines=ori_f.readlines()
    count=0
    with open(res_file,'r',encoding='utf-8') as f:
        res_lines=f.readlines()
        for i,line in enumerate(res_lines):
            lins=line.strip().split()
            if lins[0]!=lins[1] or lins[2]!=lins[3]:
                count+=1
                print(lins[0]+'-'+lins[2]+'\t'+lins[1]+'-'+lins[3])
                print(ori_lines[i].strip().split('\t')[-1])
                print('\n')
    ori_f.close()
    print(count)

if __name__ == '__main__':
    res_file='result/8.txt'
    ori_file='../data/cmcc_intent_test.txt'
    main()